package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppOrderMapper;
import com.ruoyi.system.domain.AppOrder;
import com.ruoyi.system.service.IAppOrderService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户信息Service业务层处理
 * 
 * @author xuk
 * @date 2024-08-14
 */
@Service
public class AppOrderServiceImpl implements IAppOrderService 
{
    @Autowired
    private AppOrderMapper appOrderMapper;

    /**
     * 查询用户信息
     * 
     * @param orderId 用户信息主键
     * @return 用户信息
     */
    @Override
    public AppOrder selectAppOrderByOrderId(Long orderId)
    {
        return appOrderMapper.selectAppOrderByOrderId(orderId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param appOrder 用户信息
     * @return 用户信息
     */
    @Override
    public List<AppOrder> selectAppOrderList(AppOrder appOrder)
    {
        return appOrderMapper.selectAppOrderList(appOrder);
    }

    /**
     * 新增用户信息
     * 
     * @param appOrder 用户信息
     * @return 结果
     */
    @Override
    public int insertAppOrder(AppOrder appOrder)
    {
        appOrder.setCreateTime(DateUtils.getNowDate());
        return appOrderMapper.insertAppOrder(appOrder);
    }

    /**
     * 修改用户信息
     * 
     * @param appOrder 用户信息
     * @return 结果
     */
    @Override
    public int updateAppOrder(AppOrder appOrder)
    {
        appOrder.setUpdateTime(DateUtils.getNowDate());
        return appOrderMapper.updateAppOrder(appOrder);
    }

    /**
     * 批量删除用户信息
     * 
     * @param orderIds 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteAppOrderByOrderIds(String orderIds)
    {
        return appOrderMapper.deleteAppOrderByOrderIds(Convert.toStrArray(orderIds));
    }

    /**
     * 删除用户信息信息
     * 
     * @param orderId 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteAppOrderByOrderId(Long orderId)
    {
        return appOrderMapper.deleteAppOrderByOrderId(orderId);
    }
}
